package com.ruoyi.apartments.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.apartments.mapper.ApartmentsMapper;
import com.ruoyi.apartments.domain.Apartments;
import com.ruoyi.apartments.service.IApartmentsService;

/**
 * 综合公寓管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-06
 */
@Service
public class ApartmentsServiceImpl implements IApartmentsService 
{
    @Autowired
    private ApartmentsMapper apartmentsMapper;

    /**
     * 查询综合公寓管理
     * 
     * @param apartmentId 综合公寓管理主键
     * @return 综合公寓管理
     */
    @Override
    public Apartments selectApartmentsByApartmentId(Long apartmentId)
    {
        return apartmentsMapper.selectApartmentsByApartmentId(apartmentId);
    }

    /**
     * 查询综合公寓管理列表
     * 
     * @param apartments 综合公寓管理
     * @return 综合公寓管理
     */
    @Override
    public List<Apartments> selectApartmentsList(Apartments apartments)
    {
        return apartmentsMapper.selectApartmentsList(apartments);
    }

    /**
     * 新增综合公寓管理
     * 
     * @param apartments 综合公寓管理
     * @return 结果
     */
    @Override
    public int insertApartments(Apartments apartments)
    {
        return apartmentsMapper.insertApartments(apartments);
    }

    /**
     * 修改综合公寓管理
     * 
     * @param apartments 综合公寓管理
     * @return 结果
     */
    @Override
    public int updateApartments(Apartments apartments)
    {
        return apartmentsMapper.updateApartments(apartments);
    }

    /**
     * 批量删除综合公寓管理
     * 
     * @param apartmentIds 需要删除的综合公寓管理主键
     * @return 结果
     */
    @Override
    public int deleteApartmentsByApartmentIds(Long[] apartmentIds)
    {
        return apartmentsMapper.deleteApartmentsByApartmentIds(apartmentIds);
    }

    /**
     * 删除综合公寓管理信息
     * 
     * @param apartmentId 综合公寓管理主键
     * @return 结果
     */
    @Override
    public int deleteApartmentsByApartmentId(Long apartmentId)
    {
        return apartmentsMapper.deleteApartmentsByApartmentId(apartmentId);
    }
}
